package com.hsc.yalebao.adapter;

import android.content.Context;
import android.os.Handler;
import android.os.Message;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import com.hsc.yalebao.model.NobibiBaseModel;
import com.hsc.yalebao.tools.UiUtil;
import com.hsc.yalebao.weight.RoundImageView;
import java.util.ArrayList;
import java.util.HashMap;

public class RemoveNobibiListAdapter extends BaseAdapter
{
  String TAG = "RemoveNobibiListAdapter";
  private Context context;
  int count = 1;
  ViewHolder holder = null;
  private LayoutInflater inflater;
  private ArrayList<NobibiBaseModel> list;
  private Handler mItemClickHandler;
  HashMap<Integer, View> mapView = new HashMap();

  public RemoveNobibiListAdapter(Context paramContext, ArrayList<NobibiBaseModel> paramArrayList, Handler paramHandler)
  {
    this.context = paramContext;
    this.inflater = LayoutInflater.from(paramContext);
    this.list = paramArrayList;
    this.mItemClickHandler = paramHandler;
  }

  public int getCount()
  {
    if (this.list == null)
      return 0;
    return this.list.size();
  }

  public Object getItem(int paramInt)
  {
    return this.list.get(paramInt);
  }

  public long getItemId(int paramInt)
  {
    return paramInt;
  }

  public View getView(final int paramInt, View paramView, ViewGroup paramViewGroup)
  {
    NobibiBaseModel localNobibiBaseModel;
    if (paramView == null)
    {
      this.holder = new ViewHolder();
      paramView = this.inflater.inflate(2130903170, null);
      this.holder.img_cancle = ((ImageView)paramView.findViewById(2131100230));
      this.holder.img_cancle.setOnClickListener(new View.OnClickListener()
      {
        public void onClick(View paramAnonymousView)
        {
          Message localMessage = Message.obtain();
          localMessage.what = 1;
          localMessage.obj = Integer.valueOf(paramInt);
          RemoveNobibiListAdapter.this.mItemClickHandler.sendMessage(localMessage);
        }
      });
      this.holder.img_user_pic = ((RoundImageView)paramView.findViewById(2131100228));
      this.holder.tv_user_name = ((TextView)paramView.findViewById(2131099852));
      this.holder.tv_user_nickname = ((TextView)paramView.findViewById(2131100229));
      paramView.setTag(this.holder);
      localNobibiBaseModel = (NobibiBaseModel)this.list.get(paramInt);
      if (localNobibiBaseModel != null)
        break label152;
    }
    label256: label269: 
    while (true)
    {
      return paramView;
      this.holder = ((ViewHolder)paramView.getTag());
      break;
      label152: String str1 = localNobibiBaseModel.getNick_name();
      String str2 = localNobibiBaseModel.getUser_name();
      String str3 = localNobibiBaseModel.getPicurl();
      if ("".equals(str1))
      {
        this.holder.tv_user_nickname.setText("");
        if (!"".equals(str2))
          break label256;
        this.holder.tv_user_name.setText("");
      }
      while (true)
      {
        if ("".equals(str3))
          break label269;
        UiUtil.loadAndSetPhoto(this.holder.img_user_pic, str3);
        return paramView;
        this.holder.tv_user_nickname.setText(str1);
        break;
        this.holder.tv_user_name.setText(str2);
      }
    }
  }

  public void setData(ArrayList<NobibiBaseModel> paramArrayList)
  {
    this.list = paramArrayList;
  }

  public class ViewHolder
  {
    private ImageView img_cancle;
    private RoundImageView img_user_pic;
    private TextView tv_user_name;
    public TextView tv_user_nickname;

    public ViewHolder()
    {
    }
  }
}

/* Location:           C:\Users\user\Desktop\dd28_pcdd720\classes_dex2jar.jar
 * Qualified Name:     com.hsc.yalebao.adapter.RemoveNobibiListAdapter
 * JD-Core Version:    0.6.2
 */